/*
 */
package com.ericsson.springintegrationtest.controller;

import com.ericsson.springintegrationtest.gateway.UserGateway;
import com.ericsson.springintegrationtest.model.User;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 *
 * @author eluibon
 */
public class Main {

    public static void main(String[] args) {
        
        // Instantiate Spring application context with the bean definitions and the integration flow
        // this will start the file inbound gateway (polling of a dir from XML files)
        ApplicationContext appCtx = new ClassPathXmlApplicationContext("applicationContext.xml");

        // we also insert users into the system via the userGateway
        UserGateway userGateway = appCtx.getBean("userGateway", UserGateway.class) ;
        userGateway.createUser(new User("Geeno","Puggile","aaa@bbb","1223","xxx","yyy"));
    }
}
